{extend name="apps/common/view/front.tpl" /}
<!-- -->
{block name="header_meta"}
<title>{$seoTitle}－{:config('common.site_name')}</title>
<meta name="keywords" content="{$seoKeywords}" />
<meta name="description" content="{$seoDescription}" />
<meta name="referrer" content="never">
{/block}
{block name="header"}{include file="widget/header" /}{/block}
<!--main -->
{block name="main"}
<div class="container">
  <ol class="breadcrumb bg-white mb-2">
    <li class="breadcrumb-item">
      <i class="fa fa-home text-purple"></i>
      <a href="{:cmsUrl('cms/index/index')}">首页</a>
    </li>
    {if $category_name}
    <li class="breadcrumb-item"><a href="{:cmsUrlCategory(reset($category))}">{:reset($category_name)}</a></li>
    {/if}
    <li class="breadcrumb-item active">正文</li>
  </ol>
  <div class="bg-white px-3 py-2 mb-2">
      <h1 class="h4 mb-2">{$info_name|DcHtml}</h1>
      <p>{$info_create_time}
        {foreach name="category" item="item"}
        <a class="ml-1 text-purple" href="{:cmsUrlCategory($item)}">{$item.term_name}</a>
        {/foreach}
        {foreach name="tag" item="item"}
        <a class="ml-1 text-purple" href="{:cmsUrlTag($item)}">{$item.term_name}</a>
        {/foreach}
      </p>
      <section class="info-content mb-2">{$info_content|cmsEditor}</section>
      <p class="text-center">
        <a class="btn btn-purple" href="{:cmsUrl('cms/value/up',['id'=>$info_id])}" data-toggle="infoUp">
          <i class="fa fa-thumbs-o-up"></i>
          <small class="infoUpValue">{$cms_up|number_format}</small>
        </a>
      </p>
  </div>
  {if $dataPrev = cmsPrev($info_id,1,['action'=>'index'])}
  <p class="bg-white mb-2 px-3 py-2 text-truncate">{volist name="dataPrev" id="cms"}<strong>上一篇：</strong><a href="{:cmsUrlDetail($cms)}" title="{$cms.info_name}">{$cms.info_name|DcHtml}</a>{/volist}</p>
  {/if}
  {if $dataNext = cmsNext($info_id,1,['action'=>'index'])}
  <p class="bg-white mb-2 px-3 py-2 text-truncate">{volist name="dataNext" id="cms"}<strong>下一篇：</strong><a href="{:cmsUrlDetail($cms)}" title="{$cms.info_name}">{$cms.info_name|DcHtml}</a>{/volist}</p>
  {/if}
  <div class="card border-0 rounded-0 mb-2">
    <div class="card-header bg-white">
      <i class="fa fa-fw fa-navicon mr-1 text-purple"></i>热门
    </div>
    <div class="card-body px-0 pb-0 mb-0">
      {volist name=":cmsSelect(['status'=>'normal','limit'=>20,'term_id'=>$term_id,'sort'=>'info_views','order'=>'desc','field'=>'info_name,info_slug,info_action,info_views'])" id="cms"}
      {include file="widget/item" /}
      {/volist}
    </div>
  </div>
</div>
{/block}
<!-- -->
{block name="footer"}{include file="widget/footer" /}{/block}